package com.ruoyi.system.controller;

import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.system.domain.SysMember;
import com.ruoyi.system.domain.SysMemberFinance;
import com.ruoyi.system.service.ISysMemberFinanceService;
import com.ruoyi.system.service.ISysMemberService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 会员财务Controller
 * 
 * @author ruoyi
 * @date 2024-04-07
 */
@Api(tags = "会员财务")
@RestController
@RequestMapping("/mem/memberFinance")
public class MemMemberFinanceController extends BaseController
{
    @Autowired
    private ISysMemberFinanceService sysMemberFinanceService;

    @Autowired
    private ISysMemberService sysMemberService;

    /**
     * 获取会员财务详细信息
     */

    @GetMapping(value = "/info")
    public AjaxResult getInfo() throws Exception {
        SysMember user = sysMemberService.getUserInfo();
        if(null == user){
            throw new Exception("用户未登陆");
        }
        return success(sysMemberFinanceService.selectSysMemberFinanceById(user.getId()));
    }





}
